import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Data } from '../data';
import { Question} from '../question';
import { Observable, from} from 'rxjs';

const httpOptions = {
  headers: new HttpHeaders({ 'Content-Type': 'application/json' })
};

@Injectable({
  providedIn: 'root'
})
export class QuestionsService {
  private url = 'http://47.106.129.155/api/question/'; //'https://www.onlinemeet.cn/roomservice/weapp/utils/get_login_info';
  constructor(private http: HttpClient) {}
  getData(num): Observable<Question> {
    return this.http.get<Question>(this.url + num);
  }
}
